﻿using System;

namespace ForgeCraft
{
    public class CmdHome : Command
    {
        public override string name { get { return "home"; } }
        public override string shortcut { get { return "h"; } }
        public override string type { get { return "general"; } }
        public override bool consoleUsable { get { return false; } }
        public override Permission defaultRank { get { return Permission.Guest; } }
        public CmdHome() { }

        public override void Use(Player p, string message)
        {
            p.Send(PacketWriter.MakePositionAndLook(p.info.homePos));
            p.ChunkAreaPlayer = 8;
            //p.UpdateChunks();
        }
        public override void Help(Player p)
        {
            p.Message(Color.Aqua + "/home " + Color.Help + "- Teleports you to home (spawn)");
        }
    }
}